package org.study.web;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by LUOLIANG on 2016/10/17.
 */
@RestController
@RequestMapping("/rest")
public class OkHttpController {

    @RequestMapping(value = "/{test}", method = RequestMethod.GET)
    public String testGet(@PathVariable(name = "test") String str) {

        return str;
    }

    @RequestMapping(value = "/{test}", method = RequestMethod.POST)
    public String testPost(@PathVariable(name = "test") String str) {

        return str;
    }
}
